/* 测试页面专用样式 */
.test-container {
  width: 960px;
  margin: 0 auto;
  padding: 20px;
  flex: 1;
}

.tab-bar {
  display: flex;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 15px;
  padding: 8px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.tab-btn {
  flex: 1;
  padding: 12px 20px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  backdrop-filter: blur(10px);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.test-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  text-align: center;
  border: 1px solid #e0e0e0;
}

.word-display {
  margin-bottom: 30px;
}

.word-text {
  font-size: 48px;
  font-weight: bold;
  background: linear-gradient(135deg, #4b90ff 0%, #1e3c72 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.word-display.initial-text {
  font-size: 32px;
  color: #8a8b8c;
  background: none;
  -webkit-text-fill-color: #8a8b8c;
}

.word-container {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
}

.pronunciation {
  font-size: 24px;
  color: #666;
  font-weight: normal;
}

.options-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.option-btn {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  border: none;
  border-radius: 15px;
  padding: 20px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  white-space: pre-line;
  word-wrap: break-word;
  text-align: left;
}

.option-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.option-btn.correct {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.option-btn.incorrect {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.navigation-btns {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.nav-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 15px 30px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.stats-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stats-left {
  flex: 1;
}

.stats-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.word-count-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.word-count-selector label {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  color: #fff;
}

.word-count-select {
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  min-width: 100px;
  height: 44px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  appearance: none;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23333" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 35px;
}

.word-count-select:hover {
  background-color: white;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23333" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.word-count-select:focus {
  outline: none;
  background-color: white;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23333" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4), 0 4px 15px rgba(0, 0, 0, 0.2);
}

.word-count-select[disabled] {
  background: rgba(255, 255, 255, 0.4);
  color: #e6e6e6;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.word-count-message {
  background: #4CAF50;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
  transition: all 0.3s ease;
}

.word-count-message.hidden {
  display: none;
}


.stats-text {
  font-size: 18px;
  font-weight: 600;
  color: white;
}

.timer-text {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.reset-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.reset-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.results-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.results-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  padding: 40px;
  color: white;
  text-align: center;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.results-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 30px;
}

.results-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.stat-item {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 15px;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 14px;
  opacity: 0.8;
}

.results-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  margin: 0 10px;
}

.results-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* 选择填空样式 */
.fill-blank-container {
  text-align: left;
  max-width: 100%;
}

.sentence-text {
  font-size: 20px;
  line-height: 1.6;
  color: #2c3e50;
  margin-bottom: 15px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  border-left: 4px solid #667eea;
  font-family: 'Georgia', serif;
}

.translation-text {
  font-size: 16px;
  line-height: 1.5;
  color: #666;
  margin-bottom: 20px;
  padding: 15px 20px;
  background: #fff5f5;
  border-radius: 10px;
  border-left: 4px solid #e74c3c;
  font-style: italic;
}

/* 下划线样式 */
.sentence-text {
  word-wrap: break-word;
}

.sentence-text:contains('______') {
  position: relative;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .sentence-text {
    font-size: 18px;
    padding: 15px;
  }
  
  .translation-text {
    font-size: 14px;
    padding: 12px 15px;
  }
  
  .fill-blank-container {
    text-align: center;
  }
}